<?php
add_action('init', 'db_subscriber');
function db_subscriber()
{	
	global $wpdb;
	$subscriber 		= $wpdb->prefix . "subscriber";
	$subscriber_post	= $wpdb->prefix . "subscriber_post";
		
	if ($wpdb->get_var("SHOW TABLES LIKE '$subscriber'") != $subscriber)
	{
		$wpdb->query("CREATE TABLE {$subscriber}
		(			
			ID  mediumint(10) AUTO_INCREMENT PRIMARY KEY ,
			email 		VARCHAR(100) NOT NULL			
		)ENGINE=MyISAM DEFAULT CHARSET=utf8");
	}
	
	if ($wpdb->get_var("SHOW TABLES LIKE '$subscriber_post'") != $subscriber_post)
	{
		$wpdb->query("CREATE TABLE {$subscriber_post}
		(			
			ID  mediumint(10) AUTO_INCREMENT PRIMARY KEY ,
			subscriber	INT NOT NULL,
			postID 		INT NOT NULL			
		)ENGINE=MyISAM DEFAULT CHARSET=utf8");
	}
	
}